<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" lang="ch">
<head>
    <meta charset="UTF-8">
    <title>商品信息</title>
</head>
<body>
<h1>The Goods Page</h1>
<a th:href="@{/goods/doGoodsAddUI}">添加商品</a>
<table width="50%">
    <thead style="text-align: left">
        <th>id</th>
        <th>name</th>
        <th>remark</th>
        <th>createdTime</th>
        <th colspan="2">operation</th>
    </thead>
    <tbody>
    <tr th:each="g:${list}">
        <td th:text="${g.id}">1</td>
        <td th:text="${g.name}">MySQL</td>
        <td th:text="${g.remark}">DBMS</td>
        <td th:text="${g.#dates.format(g.createdTime,'yyyy/MM/dd HH:mm')}">2020</td>
        <td><a th:href="@{/goods/doDeleteById/{id}(id=${g.id})}">delete</a></td>
        <td><a th:href="@{/goods/doFindById/{id}(id=${g.id})}">update</a></td>
    </tr>
    </tbody>
</table>
</body>
</html>